const {ccclass, property} = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {

    @property(cc.Label)
    label: cc.Label = null;

    @property
    tip: string = 'hello';

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {}

    start () {
         let i = 0;
         this.label.string = '';
         this.schedule(()=>{
             i++;
             if(i === this.tip.length+1) {
                 //do somthing
             }else{
                 this.label.string = this.tip.substring(0,i);
             }
         },0.3,this.tip.length+1,0.3);
    }

    // update (dt) {}
}
